﻿<%@ Page Language="C#" MasterPageFile="~/TimKiem/AdvanceSearch.master" AutoEventWireup="true"
    CodeFile="ket-qua-tim-kiem.aspx.cs" Inherits="TimKiem_ket_qua_tim_kiem" Title="GoogleLand.comm.vn" %>

<%@ Register Src="~/Module/Product/Product_List.ascx" TagName="List" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div id="logo">
        <img src="/images/logo.jpg" />
    </div>
    <br />
    <div id="search-control">
    <center>        
        <div id="text-box">
            <asp:TextBox runat="server" ID="txtKeyword"></asp:TextBox>
        </div>
        <asp:ImageButton runat="server" ID="btnSearch" OnClick="btnSearch_Click" ImageUrl="/images/search-button.jpg"
            CssClass="search-button1" />
        <asp:ImageButton runat="server" ID="btnAdvanceSearch"  ImageUrl="/images/advanceSearch.png"
            CssClass="search-button2" onclick="btnAdvanceSearch_Click" />  
            
            </center>     
        <br />
        <br />
    </div>
    <br />
    <div>
        <table cellspacing="0" cellpadding="0" width="100%">
            <tbody>
                <tr>
                    <td align="center">
                        <table cellspacing="0" cellpadding="0" style="margin-top: 0.75em; width: 80%;">
                            <tbody>
                                <tr>
                                    <td align="left">
                                        <div style="width: 100%;">
                                            <div>
                                                <div style="text-align: center; color: Blue">
                                                    <h2>
                                                        <asp:Label ID="lblResult" runat="server"></asp:Label>
                                                    </h2>
                                                </div>
                                            </div>
                                            <div class="block">
                                                <table cellspacing="0" cellpadding="2" width="100%">
                                                    <tbody>
                                                        <tr>
                                                            <td>
                                                                <%--<asp:GridView ID="gvSearch" runat="server">
                                                                </asp:GridView>--%>
                                                                <asp:GridView ID="gvSearch" runat="server" CellPadding="4" ForeColor="#333333" AutoGenerateColumns="False"
                                                                    GridLines="None" Width="1214px" AllowPaging="True" PageSize="15" OnPageIndexChanging="gvSearch_PageIndexChanging">
                                                                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                                                    <RowStyle BackColor="#E3EAEB" Height="25" />
                                                                    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                                                                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                                                                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" Height="30" ForeColor="White" />
                                                                    <EditRowStyle BackColor="#7C6F57" />
                                                                    <AlternatingRowStyle BackColor="White" />
                                                                    <Columns>
                                                                        <asp:TemplateField HeaderText="Tiêu đề">
                                                                        <ItemTemplate>
                                                                            <a href='<%# Eval("URLPath") %>'>
                                                                                <%# Eval("ProductName").ToString().Trim() %></a>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                        <asp:BoundField DataField="NeedsName" HeaderText="Dịch vụ">
                                                                            <HeaderStyle HorizontalAlign="left" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </asp:BoundField>
                                                                        <asp:BoundField DataField="ParentName" HeaderText="Địa điểm">
                                                                            <HeaderStyle HorizontalAlign="left" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </asp:BoundField>
                                                                        <asp:TemplateField HeaderText="Giá ( VNĐ)">
                                                                            <ItemTemplate>
                                                                                <%#FormatPrice(Eval("Price"))%>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:BoundField DataField="ViewTime" HeaderText="Lượt xem">
                                                                            <HeaderStyle HorizontalAlign="left" />
                                                                            <ItemStyle HorizontalAlign="Left" />
                                                                        </asp:BoundField>
                                                                        <asp:TemplateField HeaderText="Ngày đăng">
                                                                            <ItemTemplate>
                                                                                <%# Utils.Format.FormatVietNameDate(Convert.ToDateTime(Eval("CreateDate"))) %>
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                        <asp:TemplateField HeaderText="Ảnh">
                                                                            <ItemTemplate>
                                                                                <img src='<%#ReturnImage(Eval("ProductImage"))%>' alt='<%# Eval("ProductName") %>'
                                                                                    width="30px" height="30px" />
                                                                            </ItemTemplate>
                                                                        </asp:TemplateField>
                                                                    </Columns>
                                                                </asp:GridView>
                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                            </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
